<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - window.Mtils.utils</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/window.Mtils.html">window.Mtils</a></li>
	
	<li><a href="../symbols/window.Mtils.browser.html">window.Mtils.browser</a></li>
	
	<li><a href="../symbols/window.Mtils.constant.html">window.Mtils.constant</a></li>
	
	<li><a href="../symbols/window.Mtils.extention.html">window.Mtils.extention</a></li>
	
	<li><a href="../symbols/window.Mtils.security.html">window.Mtils.security</a></li>
	
	<li><a href="../symbols/window.Mtils.utils.html">window.Mtils.utils</a></li>
	
	<li><a href="../symbols/window.Mtils.validation.html">window.Mtils.validation</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class window.Mtils.utils
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
				
			
				工具类
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/Mtils.js.html">Mtils.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class window.Mtils.utils.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/window.Mtils.utils.html#constructor">window.Mtils.utils</a></b>()
							</div>
							<div class="description">提供一些辅助代码封装</div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class window.Mtils.utils.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.cache">cache</a></b>(key, data, objKey)
								</div>
								<div class="description">保存数据到localStorage中,该函数已扩展到Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.calcAge">calcAge</a></b>(birth, now)
								</div>
								<div class="description">计算年龄</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.ChainCallManager">ChainCallManager</a></b>(无参数)
								</div>
								<div class="description">简单版本的链式语法函数调用,该函数已扩展到Window/Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.clearEmpty">clearEmpty</a></b>(param)
								</div>
								<div class="description">清除数组或者对象中的Empty属性,以下会被判断为Empty:空数组/空对象/null/undefined/NaN/'', 该函数已扩展到Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.copy">copy</a></b>(varName)
								</div>
								<div class="description">深复制, 该函数已扩展到Mtils对象上</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.decimalConversion">decimalConversion</a></b>(number, from, to)
								</div>
								<div class="description">提供进制转换,最大为64进制</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.extractPropertyValuesInArray">extractPropertyValuesInArray</a></b>(sourceArr, properties, defaultVal)
								</div>
								<div class="description">根据对象属性在数组中抽取所有该对象属性的值组成新数组返回</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.findInArray">findInArray</a></b>(serch, arr, regular)
								</div>
								<div class="description">在数组中根据根据条件进行过滤, 该函数已扩展到Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.formatMoney">formatMoney</a></b>(long_data, length)
								</div>
								<div class="description">格式化金额, 展示位银行金额格式</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.getById">getById</a></b>(id, arr, key)
								</div>
								<div class="description">在数组中根据ID获取对象, 该函数已扩展到Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.getByteLength">getByteLength</a></b>(str_data)
								</div>
								<div class="description">获取字符串的字节长度</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.getObjectPropertyVal">getObjectPropertyVal</a></b>(obj, propName, defaultVal)
								</div>
								<div class="description">获取对象属性值</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.getVarType">getVarType</a></b>(varName)
								</div>
								<div class="description">获取变量的数据类型, 推荐使用Mtils.extention下的数据类型校验方法</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.isDefined">isDefined</a></b>(varName)
								</div>
								<div class="description">判断变量是否定义, 该函数已扩展到Mtils/window对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.isEmpty">isEmpty</a></b>(varName)
								</div>
								<div class="description">判断变量是否为空值,请注意以下对象会被判断为空值:空数组/空对象/null/undefined/NaN/'', 该函数已扩展到Mtils/Window对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.makeMap">makeMap</a></b>(keys, defaultVal)
								</div>
								<div class="description">用字符串创建map, 该函数已扩展到Mtils对象中</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.makePy">makePy</a></b>(str, extractFirst)
								</div>
								<div class="description">获取汉字拼音或首字母</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.setObjectPropertyVal">setObjectPropertyVal</a></b>(obj, propName, defaultVal, isCreate)
								</div>
								<div class="description">设置对象属性值</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">window.Mtils.utils.<b><a href="../symbols/window.Mtils.utils.html#.strIntro">strIntro</a></b>(str_data, length)
								</div>
								<div class="description">文本简介, 即截取字符串前几个字符</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>window.Mtils.utils</b>()
				</div>
				
				<div class="description">
					提供一些辅助代码封装
					<br /><i>Author: </i>Rui.Zhang.
				</div>
				
				
				
				
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name=".cache"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{any}</span>
					<span class="light">window.Mtils.utils.</span><b>cache</b>(key, data, objKey)
					
					</div>
					<div class="description">
						保存数据到localStorage中,该函数已扩展到Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
					<pre class="code">1: Mtils.cache("Authorization", "uc43d452bdb373e4a36c3efc0f91c928d7"), 这里存入了一个名为'Authorization'的数据, 取回方式:  Mtils.cache("Authorization")2: Mtils.cache("id", {id:235, name:'mr.zr', age:34}), 这里存入了一个对象, 取回方式如下:  Mtils.cache(235) 或者 Mtils.cache("id")3: Mtils.cache("man", {id:235, name:'mr.zr', age:34}, "id"), 这里存入了一个对象, 取回方式如下:  Mtils.cache(235) 或者 Mtils.cache("man")</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{string}</span> <b>key</b>
									
								</dt>
								<dd>存取键值, key值重复会导致数据覆盖, 如果参数2为对象, key值可以为该对象属性</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>data</b>
									
								</dt>
								<dd>欲存取数据</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>objKey</b>
									<i>Optional</i>
								</dt>
								<dd>可选项, 当存取数据为对象时, 指定此选项后, 可以通过data[objKey]的值来存取数据</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{any}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".calcAge"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{Int}</span>
					<span class="light">window.Mtils.utils.</span><b>calcAge</b>(birth, now)
					
					</div>
					<div class="description">
						计算年龄
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Date}</span> <b>birth</b>
									
								</dt>
								<dd>待设置的对象</dd>
							
								<dt>
									<span class="light fixedFont">{Date}</span> <b>now</b>
									
								</dt>
								<dd>待设置属性名称</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Int}</span> 计算出的年龄</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".ChainCallManager"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{none}</span>
					<span class="light">window.Mtils.utils.</span><b>ChainCallManager</b>(无参数)
					
					</div>
					<div class="description">
						简单版本的链式语法函数调用,该函数已扩展到Window/Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
					<pre class="code">此方案简单解决回调的解决方案,使用如下:ChainCallManager() 返回一个链式调用对象,可以调用.then(fn)来注册需要调用的函数当函数注册完毕后,调用.start()或.run(),方法启动函数链的调用.start()该函数需要你在函数中使用this.next()或this.callNext()方法来手动调用下一个函数,适用于函数之间有先后顺序的调用.比如异步且有顺序,.next()/.callNext()可以传递参数给下一个函数.run()函数则系统自动按注册顺序调用调用,适合于函数之间没有关联的调用.比如:函数中有异步请求,则系统不会消耗时间等待异步请求返回.会在发送异步请求后直接调用下一个函数ChainCallManager().then(function(params) {	 console.log('this is one function', params);  this.next('call function2'); //请注意,如果这里不调用.next(),函数调用将在这里终止,.next()函数中的参数将会传递给下一个函数}).then(function(params) {  console.log('this is two function', params);}).start('start');  //携带启动参数 start上面将会依次输出: line1: this is one function startline2: this is two function call function2ChainCallManager().then(function(params) {	 console.log('this is one function', params);  return 'call funtcion2';    //这里的返回值将会传递给下一个函数}).then(function(params) {  console.log('this is two function', params);}).run('start'); //携带启动参数 start上面将会依次输出: line1: this is one function startline2: this is two function call funtcion2</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{none}</span> <b>无参数</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{none}</span> , 无返回值</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".clearEmpty"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{any}</span>
					<span class="light">window.Mtils.utils.</span><b>clearEmpty</b>(param)
					
					</div>
					<div class="description">
						清除数组或者对象中的Empty属性,以下会被判断为Empty:空数组/空对象/null/undefined/NaN/'', 该函数已扩展到Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Array|Object}</span> <b>param</b>
									
								</dt>
								<dd>欲清除的目标对象</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{any}</span> result  已清除empty属性的对象</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".copy"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{any}</span>
					<span class="light">window.Mtils.utils.</span><b>copy</b>(varName)
					
					</div>
					<div class="description">
						深复制, 该函数已扩展到Mtils对象上
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{any}</span> <b>varName</b>
									
								</dt>
								<dd>待复制的数据</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{any}</span> ,  返回深复制的新对象</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".decimalConversion"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{String}</span>
					<span class="light">window.Mtils.utils.</span><b>decimalConversion</b>(number, from, to)
					
					</div>
					<div class="description">
						提供进制转换,最大为64进制
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
					<pre class="code">把16进制0x7b转为2进制, Mtils.utils.decimalConversion("7b",16,2);</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>number</b>
									
								</dt>
								<dd>待转换进制序列</dd>
							
								<dt>
									<span class="light fixedFont">{number}</span> <b>from</b>
									
								</dt>
								<dd>待转换进制(2-64)</dd>
							
								<dt>
									<span class="light fixedFont">{number}</span> <b>to</b>
									
								</dt>
								<dd>转换到进制(2-64)</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{String}</span> , 转换后的进制序列</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".extractPropertyValuesInArray"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{Array}</span>
					<span class="light">window.Mtils.utils.</span><b>extractPropertyValuesInArray</b>(sourceArr, properties, defaultVal)
					
					</div>
					<div class="description">
						根据对象属性在数组中抽取所有该对象属性的值组成新数组返回
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{array}</span> <b>sourceArr</b>
									
								</dt>
								<dd>待查找的数组</dd>
							
								<dt>
									<span class="light fixedFont">{string}</span> <b>properties</b>
									
								</dt>
								<dd>要获取的字段</dd>
							
								<dt>
									<span class="light fixedFont">{string}</span> <b>defaultVal</b>
									
								</dt>
								<dd>默认值</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Array}</span> , 指定属性的集合</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".findInArray"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{array}</span>
					<span class="light">window.Mtils.utils.</span><b>findInArray</b>(serch, arr, regular)
					
					</div>
					<div class="description">
						在数组中根据根据条件进行过滤, 该函数已扩展到Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{any}</span> <b>serch</b>
									
								</dt>
								<dd>查询条件,可以为字符串,也可以用数组一次查询多个</dd>
							
								<dt>
									<span class="light fixedFont">{array}</span> <b>arr</b>
									
								</dt>
								<dd>数据源</dd>
							
								<dt>
									<span class="light fixedFont">{boolean}</span> <b>regular</b>
									
								</dt>
								<dd>在匹配字符串时是否启用正则,启用正则后,查询条件中的值将转化为正则表达式</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{array}</span> result 符合条件的返回结果集</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".formatMoney"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{String}</span>
					<span class="light">window.Mtils.utils.</span><b>formatMoney</b>(long_data, length)
					
					</div>
					<div class="description">
						格式化金额, 展示位银行金额格式
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Long}</span> <b>long_data</b>
									
								</dt>
								<dd>待格式化数值</dd>
							
								<dt>
									<span class="light fixedFont">{Integer}</span> <b>length</b>
									<i>Optional</i>
								</dt>
								<dd>可选,格式化金额精度, 即小数点位数. 如: 3 标示保留小数点后三位, 默认为2位</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{String}</span> , 格式化后金额</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".getById"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{array}</span>
					<span class="light">window.Mtils.utils.</span><b>getById</b>(id, arr, key)
					
					</div>
					<div class="description">
						在数组中根据ID获取对象, 该函数已扩展到Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{string|number|array}</span> <b>id</b>
									
								</dt>
								<dd>欲获取的ID值</dd>
							
								<dt>
									<span class="light fixedFont">{array}</span> <b>arr</b>
									
								</dt>
								<dd>数据源</dd>
							
								<dt>
									<span class="light fixedFont">{string}</span> <b>key</b>
									
								</dt>
								<dd>如指定此参数则使用此参数为key进行查询</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{array}</span> result 符合条件的返回结果集,如果传入的不是数组则返回结果集中的第一个元素</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".getByteLength"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{Long}</span>
					<span class="light">window.Mtils.utils.</span><b>getByteLength</b>(str_data)
					
					</div>
					<div class="description">
						获取字符串的字节长度
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>str_data</b>
									
								</dt>
								<dd>待获取长度的数据</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Long}</span> , 字符串长度</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".getObjectPropertyVal"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{Any}</span>
					<span class="light">window.Mtils.utils.</span><b>getObjectPropertyVal</b>(obj, propName, defaultVal)
					
					</div>
					<div class="description">
						获取对象属性值
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>obj</b>
									
								</dt>
								<dd>待获取长度的数据</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>propName</b>
									
								</dt>
								<dd>待获取属性名称</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>defaultVal</b>
									
								</dt>
								<dd>待获取属性未定义则返回此值</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Any}</span> , 获取的属性值</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".getVarType"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{string}</span>
					<span class="light">window.Mtils.utils.</span><b>getVarType</b>(varName)
					
					</div>
					<div class="description">
						获取变量的数据类型, 推荐使用Mtils.extention下的数据类型校验方法
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{varName}</span> <b>varName</b>
									
								</dt>
								<dd>待取数据类型的变量</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{string}</span> , 变量的数据类型,可能能为以下类型object,array,number,string,function,date,null,undefined</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".isDefined"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{boolean}</span>
					<span class="light">window.Mtils.utils.</span><b>isDefined</b>(varName)
					
					</div>
					<div class="description">
						判断变量是否定义, 该函数已扩展到Mtils/window对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{varName}</span> <b>varName</b>
									
								</dt>
								<dd>待判断的变量</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{boolean}</span> , true/false</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".isEmpty"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{boolean}</span>
					<span class="light">window.Mtils.utils.</span><b>isEmpty</b>(varName)
					
					</div>
					<div class="description">
						判断变量是否为空值,请注意以下对象会被判断为空值:空数组/空对象/null/undefined/NaN/'', 该函数已扩展到Mtils/Window对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{varName}</span> <b>varName</b>
									
								</dt>
								<dd>待判断数据类型的变量</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{boolean}</span> , true/false</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".makeMap"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{object}</span>
					<span class="light">window.Mtils.utils.</span><b>makeMap</b>(keys, defaultVal)
					
					</div>
					<div class="description">
						用字符串创建map, 该函数已扩展到Mtils对象中
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
					<pre class="code">Mtils.utils.makeMap('id,name,sex');  返回值: {id:true, name:true, sex:true}</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{string}</span> <b>keys</b>
									
								</dt>
								<dd>主键字符串,使用','分隔多个key, 例如'key1, key2,...'</dd>
							
								<dt>
									<span class="light fixedFont">{any}</span> <b>defaultVal</b>
									
								</dt>
								<dd>创建对象时使用的默认值</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{object}</span> , 返回创建完成的对象</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".makePy"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{String}</span>
					<span class="light">window.Mtils.utils.</span><b>makePy</b>(str, extractFirst)
					
					</div>
					<div class="description">
						获取汉字拼音或首字母
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>str</b>
									
								</dt>
								<dd>待获取拼音的字符串,除汉字外其余字符会直接返回</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>extractFirst</b>
									
								</dt>
								<dd>只获取汉字拼音首字母</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{String}</span> 目标的拼音字符串</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".setObjectPropertyVal"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{Void}</span>
					<span class="light">window.Mtils.utils.</span><b>setObjectPropertyVal</b>(obj, propName, defaultVal, isCreate)
					
					</div>
					<div class="description">
						设置对象属性值
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>obj</b>
									
								</dt>
								<dd>待设置的对象</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>propName</b>
									
								</dt>
								<dd>待设置属性名称</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>defaultVal</b>
									
								</dt>
								<dd>待设置属性的值</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>isCreate</b>
									
								</dt>
								<dd>如没有该属性是否创建,默认不创建</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Void}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name=".strIntro"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					<span class="light">{String}</span>
					<span class="light">window.Mtils.utils.</span><b>strIntro</b>(str_data, length)
					
					</div>
					<div class="description">
						文本简介, 即截取字符串前几个字符
						
						<br /><i>Author: </i>Rui.Zhang.
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>str_data</b>
									
								</dt>
								<dd>待截取文本</dd>
							
								<dt>
									<span class="light fixedFont">{Integer}</span> <b>length</b>
									
								</dt>
								<dd>待截取长度</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{String}</span> , 文本简介</dd>
							
							</dl>
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Thu Jul 19 2018 17:02:29 GMT+0800 (CST)
		</div>
	</body>
</html>
